package com.lizemin.listener.listener;

import com.lizemin.listener.listener.event.RegisterEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @author lzm
 * @date 2025/4/12 16:57
 * @description
 */
@Slf4j
@Component
public class EmailListener {

    /**
     * 发送邮件的监听器
     *
     * @param event 事件对象
     */
    @EventListener
    public void sendEmail(RegisterEvent event) {
        String username = event.getUsername();
        log.info("开始给用户{}发送注册成功的邮件", username);
    }

}
